import Vue from 'vue'
import Router from 'vue-router'
/* import Recommend from '@/components/recommend/Recommend'
import Singer from '@/components/singer/Singer'
import Rank from '@/components/rank/Rank'
import Search from '@/components/search/Search' */

Vue.use(Router)

export default new Router({
  mode: 'history',
  routes: [
    {
      path: '/',
      redirect: '/recommend'
    },
    {
      path: '/recommend',
      component: (resolve) => require(['@/components/recommend/Recommend'], resolve),
      children: [
        {
          path: ':id',
          component: (resolve) => require(['@/components/recommend/RecommendDetail'], resolve)
        }
      ]
    },
    {
      path: '/singer',
      component: (resolve) => require(['@/components/singer/Singer'], resolve),
      children: [
        {
          path: ':id',
          component: (resolve) => require(['@/components/singer/SingerDetail'], resolve)
        }
      ]
    },
    {
      path: '/rank',
      component: (resolve) => require(['@/components/rank/Rank'], resolve),
      children: [
        {
          path: ':id',
          component: (resolve) => require(['@/components/rank/RankDetail'], resolve)
        }
      ]
    },
    {
      path: '/search',
      component: (resolve) => require(['@/components/search/Search'], resolve),
    },
    {
      path: '/user',
      /* component: Search, */
    },
    {
      path: '/menu',
      /* component: Search, */
    },
    {
      path: '/mv',
      component: (resolve) => require(['@/components/mv/Mv'], resolve),
      children: [
        {
          path: ':id',
          component: (resolve) => require(['@/components/mv/MvPlay'], resolve)
        }
      ]
    }
  ]
})
